﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Dialogs
{
    public partial class frmDialogs : Form
    {
        public frmDialogs()
        {
            InitializeComponent();
        }

        private void btnMessage_Click(object sender, EventArgs e)
        {
            DialogResult Result;

            Result = MessageBox.Show("Contact with server lost!", "Sever Error", MessageBoxButtons.AbortRetryIgnore, MessageBoxIcon.Exclamation);

            switch (Result)
            {
                case DialogResult.Ignore:
                    MessageBox.Show("You clicked ignore.");
                    break;
                case DialogResult.Retry:
                    MessageBox.Show("You clicked retry.");
                    break;
                case DialogResult.Abort:
                    MessageBox.Show("You clicked abort.");
                    break;
            }
        }
    }
}
